package mju.cxf.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import mju.cxf.dto.AdminDTO;
import mju.cxf.dto.ProductDTO;
import mju.cxf.entity.Product;

import java.util.List;

public interface ProductService extends IService<Product> {
    Page<ProductDTO> selectPageByName(String name, Integer state, int current, int size) ;

    boolean updateProduct(ProductDTO productDTO);

    boolean saveProduct(ProductDTO productDTO);

    boolean deleteProduct(Integer id);

    Product selectProduct(int id);
    /**
     *
     * @param id
     * @return
     */
    List<Product> selectByCategoriesId(int id);

    String selectAllProductsCount();
}
